{% extends "base.html" %}

{% block content %}
<div class="container mt-3">
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{{ url_for('index') }}">首页</a></li>
            <li class="breadcrumb-item"><a href="#">{{ owner.username }}</a></li>
            <li class="breadcrumb-item"><a href="{{ url_for('repo_detail', username=owner.username, repo_name=repo.name) }}">{{ repo.name }}</a></li>
            <li class="breadcrumb-item active">设置</li>
        </ol>
    </nav>

    <div class="d-flex justify-content-between align-items-center mb-3">
        <h2>仓库设置</h2>
    </div>

    <div class="card mb-4">
        <div class="card-header">
            <ul class="nav nav-tabs card-header-tabs">
                <li class="nav-item">
                    <a class="nav-link active" href="#">基本信息</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">协作者</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">危险区域</a>
                </li>
            </ul>
        </div>
        <div class="card-body">
            <form method="POST" action="{{ url_for('repo_settings_view', username=owner.username, repo_name=repo.name) }}">
                <div class="mb-3">
                    <label for="repoName" class="form-label">仓库名称</label>
                    <input type="text" class="form-control" id="repoName" name="repo_name" value="{{ repo.name }}">
                </div>
                <div class="mb-3">
                    <label for="repoDesc" class="form-label">描述</label>
                    <textarea class="form-control" id="repoDesc" name="description" rows="3">{{ repo.description }}</textarea>
                </div>
                <div class="mb-3 form-check">
                    <input type="checkbox" class="form-check-input" id="repoPublic" name="is_public" {% if repo.is_public %}checked{% endif %}>
                    <label class="form-check-label" for="repoPublic">公开仓库</label>
                </div>
                <button type="submit" class="btn btn-primary">保存设置</button>
            </form>
        </div>
    </div>
</div>
{% endblock %}
